<include file="Public/head"/>

<style type="text/css">

     .div0{

            background-color:#121b38;
        }

.inputys{background-color:rgba(255,255,255,0); height:40px; outline: none;border:0px; color:#fff;width:100%;}
* {padding:0;margin:0;}

table {border-collapse:collapse;border:1px #424664 solid;margin:0 auto; color:#bdc8e9;}
th, td {border:1px #424664 solid;text-align:center;font-size:12px;line-height:30px;}
th {line-height:50px;}
/*模拟对角线*/
.out {width:0px;height:0px;position:relative;}
b {font-style:normal;display:block;position:absolute;top:-23px;left:30px;width:77px; line-height:15px;}
em {font-style:normal;display:block;position:absolute;top:-5px;left:-30px;width:100px; line-height:15px;}
span.line{ display:block; width:100px; height:1px; background:#424664;-webkit-transform:rotate(28deg);-ms-transform:rotate(28deg); -moz-transform:rotate(28deg); transform:rotate(28deg); position:absolute; top:0px; left:-3px;}
option {
    background: #162146;
}
.time-selected:active,.time-selected:hover,,.time-selected:focus {
    background: red;
}

#page a {
    text-decoration:none;
}
.close-all {
    text-align: center;
}
.close-img {
    width: 55px;
}
.close-ck {
    padding-top: 11px;
}
.row-fluid{
    margin-top: 10px;
}
    /*.t1{*/
        /*text-align: center;*/
    /*}*/
</style>

    <script type="text/javascript">
        var count = 1;
        function ChangeBGC(obj)
        {
            //有了简单 计数变量 配合 if-else判断
            //就可以实现 颜色的转变
            if(count%2!=0)
            {
                obj.style.backgroundColor = "#192857";
            }
            else
            {
                obj.style.backgroundColor = "#121b38";
            }
            count++;
        }
    </script>

<body style="padding-top: 38px">
<div class="container">
         <div style=" float:right; padding-top:15px;">
			<!-- <img src="__IMG__/yj.png" alt="" width="27" height="15"  />	 -->
	     </div>

          <div class="row-fluid" style=" background-image:url(__IMG__/bg1.png); height:120px; border-radius: 4px; margin-top:20px;">
          <div  class="t1" style=" text-align:right;padding-top:5px; padding-right:15px;">
                <!--<a href="{:U('Finance/history')}" style="color: #fff;text-decoration:none;">{:L('_ZD_')}</a>-->
                <a href="{:U('Finance/index')}" style="color: #fff;text-decoration:none;">返回资产</a>
          </div>
              <div style="padding: 1rem;">
                  <!--<div  class="t1" >资产券 {$userData['z1']}</div>-->
                  <div  class="t1" style="color:#fff">EASY {$userData['z11']}</div>
                  <div  class="t1" style="color:#fff">ASSET {$userData['z7']}</div>
                  <div  class="t1" style="color:#fff">USDT {$userData['z8']}</div>
                  <!--<div  style=" font-size:22px; color:#fff;">{$lockData + $userData['reward1']} GBC</div>-->
                  <!--<div  style=" font-size:14px; color:#fff;">¥ {$totalDataCny | default='0.00'}</div>-->


              </div>

	     </div>



       <div class="row-fluid " style=" margin-top:15px; height:30px;">
        <a  href="{:U('Finance/charge')}">
           <div class="qk" style=" width:30%; float:left;height:30px; line-height:30px;" class="div0" onclick="ChangeBGC(this)">

              <p class="t1" style=" text-align:center; background-color:#1045A7;color:#fff;border-radius:6px;">{:L('_CB_')}</p>

         </div>
        </a>
        <!--<div  style=" width:5%; float:left;"> &nbsp;&nbsp;</div>-->

        <!--<a  href="{:U('Finance/transfer')}">-->
            <!--<div class="qk" style=" width:30%; float:left;height:30px; line-height:30px; " class="div0" onclick="ChangeBGC(this)">-->
                <!--<p class="t1" style=" text-align:center; color:#2cd0da; ">{:L('_ZZ_')}</p>-->
            <!--</div>-->
        <!--</a>-->

        <div  style=" width:5%; float:left;">&nbsp;&nbsp; </div>

        <a  href="{:U('Finance/withdraw')}">
            <div class="qk" style=" width:30%; float:right;height:30px; line-height:30px;" class="div0" onclick="ChangeBGC(this)">
                <p class="t1" style=" text-align:center;background-color:#1045A7;color:#fff;border-radius:6px; ">{:L('_TB_')}</p>
            </div>
        </a>
           <!--<div  style=" width:5%; float:left;">&nbsp;&nbsp; </div>-->

           <!--<a  href="{:U('Finance/live')}">-->
               <!--<div class="qk" style=" width:30%; float:right;height:30px; line-height:30px;" class="div0" onclick="ChangeBGC(this)">-->
                   <!--<p class="t1" style=" text-align:center; color:#2cd0da; ">存币生息</p>-->
               <!--</div>-->
           <!--</a>-->


       </div>


  <!--<div class="row-fluid qk" style=" margin-top:15px; height:100%; ">-->
<!--余额-->
    <!--<div style=" height:60px; padding-top:10px;">-->
           <!--<div style=" float:left; padding-left:15px; padding-top:5px; "><img src="__IMG__/logo_3.png"  width="28" height="31" /></div>-->
           <!--<div style="float:left; width:45%; padding-left:15px;">-->
                <!--<div class="t1">{:L('_GBCSC_')}</div>-->
               <!--<div style=" font-size:14px; color:#808bab;">GBC Token</div>-->
           <!--</div>-->

          <!--<div style="  float:right; padding-right:15px; text-align:right;">-->
               <!--<div class="t1" >{$lockData | default='0.00'}</div>-->
               <!--<div style=" font-size:16px; color:#808bab;">¥ {$lockDataCny | default='0.00'}</div>-->
           <!--</div>-->
    <!--</div>-->
    <!--<div class="line1"></div>-->

    <!--<div style=" height:60px; padding-top:10px;">-->
       <!--<div style=" float:left; padding-left:15px; padding-top:5px; ">-->
         <!--<img src="__IMG__/logo_2.png"  width="30" height="33" /></div>-->
       <!--<div style="float:left; width:45%; padding-left:15px;">-->
            <!--<div class="t1">GBC（{:L('_ZH_')}）</div>-->
           <!--<div style=" font-size:14px; color:#808bab;">GBC Token</div>-->
       <!--</div>-->

       <!--<div style="  float:right; padding-right:15px; text-align:right;">-->
           <!--<div class="t1" >{$userData['reward1'] | default='0.00'}</div>-->
           <!--<div style=" font-size:16px; color:#808bab;">¥ {$userDataCny | default='0.00'}</div>-->
       <!--</div>-->
    <!--</div>-->

   <!--<div class="line1"></div>-->

    <!--<div style=" height:60px; padding-top:10px;">-->
       <!--<div style=" float:left; padding-left:15px; padding-top:5px; "><img src="__IMG__/B.png"  width="30" height="30" /></div>-->
       <!--<div style="float:left; width:45%; padding-left:15px;">-->
            <!--<div class="t1">BTC</div>-->
           <!--<div style=" font-size:14px; color:#808bab;">bitcoin</div>-->
       <!--</div>-->

      <!--<div style="  float:right; padding-right:15px; text-align:right;">-->
           <!--<div class="t1" >425.22854</div>-->
           <!--<div style=" font-size:16px; color:#808bab;">可用：400.2525</div>-->
       <!--</div>-->
    <!--</div>-->

    <!--<div class="line1"></div>-->

    <!--<div style=" height:15px;"></div>-->
    <!--</div>-->
    <!--记录-->
    <div class="row-fluid qk" style=" margin-top:15px; height:100%;">
    <!--<div style=" font-size:16px; color:#fff; padding-top:10px; margin-left:15px; padding-bottom:10px;">{:L('_FHJL_')}</div>-->
    <div style=" font-size:16px;  padding-top:10px; margin-left:15px; padding-bottom:10px;">充提记录</div>
    <div class="line1"></div>

    <volist name="chargeData" id="vo">
    <div style=" height:60px; padding-top:10px;">
        <div style=" float:left; padding-left:15px; padding-top:5px; ">
          <!--<img src="__IMG__/logo_4.png"  width="30" height="33" />-->
            <if condition="$vo['coinname'] eq 'usdt'">
                <img src="__IMG__/usdt.png"  width="30" height="33" />
                <elseif condition="$vo.coinname eq 'asset'"/>
                <img src="__IMG__/asset.png"  width="30" height="33" />
                <elseif condition="$vo.coinname eq 'easy'"/>
                <img src="__IMG__/easy.png"  width="30" height="33" />
                <else/>
                <img src="__IMG__/logo_4.png"  width="30" height="33" />

            </if>
        </div>
        <div style="float:left; padding-left:15px;">
            <div class="t1">{$vo.coinname} &nbsp;&nbsp;
                <!--<span style=" color:#00ff00; font-size:12px;">{:L('_FH_')}</span>-->
                <span style=" color:#00ff00; font-size:12px;">
               <if condition="$vo['type'] eq 1">
                  充币
                <else/>
                  提币
                </if>
                </span>


            </div>
            <div class="t3">{$vo.addtime|date='Y-m-d H:i:s',###}</div>
        </div>

       <!--<div style=" float:right; padding-right:15px; text-align:right; color:#FFF; padding-top:15PX;">-->
       <div style=" float:right; padding-right:15px; text-align:right; color:#333;">
           <span>{$vo.amount}</span>
           <if condition="$vo['status'] eq 1">

               <p style="margin: 0;"><span>状态：</span><span style="color: green;">已完成</span></p>

               <elseif condition="$vo['status'] eq 2" />

               <p style="margin: 0;"><span>状态：</span><span style="color: red;">审核中</span></p>

               <else/>

               <p style="margin: 0;"><span>状态：</span><span style="color: red;">已驳回</span></p>

           </if>

       </div>
    </div>
    <div class="line1"></div>
    </volist>

    </div>
    <!--<div id="page" style="text-align: center;height:50px;line-height: 50px;">{$page}</div>-->
    <ul class="pages" id="page">{$page}</ul>
     <div style=" height:100px;"></div>

 </div>

    <div class=" ft">
        <div class="row">
            <!--<a href="{:U('Index/index')}"  >-->
                <a href="/index.php"  >
                    <div class="col-xs-3">
                      <img src="__IMG__/home.png" width="25" height="25"  />
                      <!--<p class="t6">{:L('_SY_')}</p>-->
                      <p class="t6">商城</p>
                    </div>
            </a>
            <a href="https://www.happycoin.pro"  >
                    <div class="col-xs-3">
                      <img src="__IMG__/logo_5.png" width="25" height="25"  />
                      <p class="t6">交易所</p>
                    </div>
            </a>

            <a href="{:U('Market/index')}" >
                    <div class="col-xs-3">
                  <img src="__IMG__/bourse.png" width="24" height="25"  />
                      <p class="t6">{:L('_HQ_')}</p>
                    </div>
            </a>

            <a href="{:U('Finance/index')}" >
                    <div class="col-xs-3">
                  <img src="__IMG__/zc-1.png" width="24" height="25"  />
                      <p class="t5">{:L('_ZC_')}</p>
                    </div>
            </a>

            <a href="{:U('Account/index')}" >
                    <div class="col-xs-3">
                   <img src="__IMG__/zh.png" width="21" height="25"  />
                      <p class="t6">{:L('_ZH_')}</p>
                    </div>
            </a>
        </div>
    </div>
</body>
</html>
<script type="text/javascript">

    $("#all").click(function() {
        $("#amount").val("{$userData['reward1']}");
    });


    $("#btn-1").click(function(){

        var balance = "{$userData['reward1']}";
        var amount = $("#amount").val();

        if(amount == '')
        {
            amount = 0;
        }

        if(amount == ''){
            layer.msg('锁仓数量不能为空',{time:1000});
            return false;
        }

        if(parseFloat(amount) <= 0)
        {
            layer.msg('锁仓数量不能为0',{time:1000});
            return false;
        }

        if(parseFloat(amount) > parseFloat(balance))

        {
            layer.msg('账户余额不足',{time:1000});
            return false;
        }

        layer.confirm("请确认锁仓："+amount+" GBC ", {
          btn: ['是','否'] //按钮
        }, function(){

         $.ajax({
            type: 'POST',
            url: "{:U('Locked/index')}",
            dataType: 'json',
            data: {
                amount:amount
            },
            success: function(data){
                 if(data.code>0){
                    layer.msg(data.message,{time:1000});

                    window.location.href="{:U('Finance/index')}";
                 }
                 else{
                    layer.msg(data.message,{time:1000});
                 }
            }
        })


        }, function(){

        });

 });

</script>

